/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.dao;

import com.sigmatrix.h5.dao.impl.common.BaseDao;
import com.sigmatrix.h5.entity.SyncTask;
import com.sigmatrix.h5.exception.DaoException;

/**
 * @ClassName: SyncTaskDao
 * @Description: 异步任务数据库操作接口
 * @author youjun @date 2017-11-27 16:04:46
 */
public interface SyncTaskDao extends BaseDao<SyncTask> {

	/**
	 * @Title: findById
	 * @Description: 根据主键查找异步任务
	 * @return SyncTask
	 * @author youjun 
	 * @date 2017-11-27 16:04:46
	 * @param id
	 * @return
	 * @throws SigmatrixDaoException
	 */
	SyncTask findById(final Integer id, final String enterpriseCode) throws DaoException;

	/**
	 * @Title: save
	 * @Description: 保存异步任务
	 * @return int
	 * @author youjun 
	 * @date 2017-11-27 16:04:46
	 * @param syncTask
	 * @return
	 * @throws SigmatrixDaoException
	 */
	int save(final SyncTask syncTask, final String enterpriseCode) throws DaoException;

	/**
	 * @Title: update
	 * @Description: 更新异步任务
	 * @return int
	 * @author youjun 
	 * @date 2017-11-27 16:04:46
	 * @param syncTask
	 * @return
	 * @throws SigmatrixDaoException
	 */
	int update(final SyncTask syncTask, final String enterpriseCode)  throws DaoException;
	/**
	 *@Title: updateStatus
	 *@Description: TODO()
	 *@return void
	 *@author youjun
	 *@date 2017年11月27日 下午8:12:30
	 *@param enterpriseCode
	 *@param syncTaskId
	 *@param syncTaskStatusHandleIng
	 */
	int updateStatus(String enterpriseCode, int syncTaskId, short syncTaskStatusHandleIng)  throws DaoException;

}
